home *** CD-ROM | disk | FTP | other *** search
- Path: ida.his.se!usenet
- From: a95hanne@ida.his.se (Hannu Nevalainen)
- Newsgroups: comp.sys.amiga.applications
- Subject: Re: Cap'n TextEd needs some help!
- Followup-To: comp.sys.amiga.applications
- Date: 30 Mar 1996 00:27:12 GMT
- Organization: NONE!
- Distribution: World
- Message-ID: <1576.6662T1327T1969@ida.his.se>
- References: <4j4dnq$f82@iac2.ltec.net> <DoztDI.5ut@rose.com>
- NNTP-Posting-Host: ipcsun2.ida.his.se
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
-
- > +On 28-Mar-96 20:41:41 A White
- > +<awhite@user.rose.com>
- > +wrote about "Re: Cap'n TextEd needs some help!"
- > +in "comp.sys.amiga.applications"...
-
- > In article <4j4dnq$f82@iac2.ltec.net>, No Quarter <dl63832@ltec.net>
- > wrote:
- >>text file (200K plus) that consists of one line if text and 3 blank lines.
- >>I want to remove all blank lines so that I have single spaced ascii text
-
- I seem to have missed the original posting, so I'll reply on this one ;)
-
- As I understand it Mr/Ms/It(?) "No Quarter <dl63832@ltec.net>" ;)
- wants to have ALL text in a file - on a single line.
- This can be done quickly with ARexx
-
- <sb>
- <sb> [ Enter this text into a file named "REXX:make_one_line.rexx" ]
- <sb>
- /* replace all LF's in a file with spaces */
-
- parse arg infile outfile .
-
- if (open(i,infile,'r')+open(o,outfile,'w')~=2) then
- exit 20
-
- l=32768;
- b=readch(i,l);
- do while ~eof(i);
- call writech(o,translate(b,' ','0a'x));
- b=readch(i,l);
- end;
- call writech(o,translate(b,' ','0a'x));
- <sb>
- <sb> [ eof ]
- <sb>
-
- Then this will do "it"
-
- 1> rx make_one_line file_to_convert outfile
-
- And this may work, if you have REXX: in your path and a newer version of OS
-
- 1> protect REXX:make_one_line.rexx +s
- 1> make_one_line file_to_convert outfile
-
- /Hannu E.K. Nevalainen, Amiga since '85. /*á1996-03-29á@19:25áCETá*/
- >> Inform yourself... http://www.amiga.de/ /*áThorá2.22á[1642]á*/
- <tsb> rexx:random(55 tags) -> "Acronyms_McInToch"
-
- Macintosh = Machine Always Crashes. If Not - The OS Hangs.
-
-